package com.ea.admin.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ea.admin.pojo.dto.AdminAccountDto;
import com.ea.admin.pojo.po.AdminAccount;
import com.ea.common.mybatis.EmoAnalyBaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface AdminAccountMapper extends EmoAnalyBaseMapper<AdminAccount> {
    /**
     * 根据账号id查询账号信息，包括被删除的账号
     */
    AdminAccount selectAdminAccountById(
            @Param("accountId") Long accountId
    );

    AdminAccountDto selectAdminAccountDtoByAccountId(
            @Param("accountId") Long accountId
    );

    Page<AdminAccountDto> selectAdminAccountDto(
            Page<AdminAccountDto> objectPage,
            @Param("username") String username,
            @Param("name") String name,
            @Param("phoneNumber") String phoneNumber,
            @Param("companyIdList") List<Long> companyIdList,
            @Param("deptIdList") List<Long> deptIdList,
            @Param("adminRoleIdList") List<Integer> adminRoleIdList
    );
}
